<template>
<div>
  <div>{{msg}}</div>
  用户名：<input type="text" v-model="userName" />{{userName}}<br>
  密码：<input type="password" v-model="pwd" /><br>
  <input type="button" value="登录" @click="land()"><br>
</div>
</template>

<script>
export default {
  data(){//存放数据
    return{
      msg:"欢迎",
      userName:"",
      pwd:""
    }
  },
  methods:{
    land(){
      // alert(this.userName+" "+this.pwd);
      if (this.userName=="java" &&this.pwd=="000"){
        alert("登陆成功");
      }else {
        alert("登陆失败");
      }
    }

  }


}
</script>

<style scoped>

</style>